package jeopardy.common.protocol.game.play;

import java.io.Serializable;

/*
 * This class is used by the server to send message to client at the beginning of a round:
 * 1) Contains new question to be answered
 * 2) The time allowed for this round
 * 3) The eligible players
 * 4) How many points this question is worth
 * 5) Answer field that will be blank
 * 
 */

public class NewQuestionMsg implements Serializable{
	
	private static final long serialVersionUID = 23942634L;
	
	private String question = "";
	private long timeToPlayMillis = 0;
	private String[] eligiblePlayers;
	private int points;
	private String answer = "";
	
	public NewQuestionMsg(String question, String answer, long timeToPlayMillis, String[] eligiblePlayers, int points){
		this.question = question;
		this.answer = answer;
		this.timeToPlayMillis = timeToPlayMillis;
		this.eligiblePlayers = eligiblePlayers;
		this.points = points;
	}

	public String[] getEligiblePlayers() {
		return eligiblePlayers;
	}

	public long getTimeToPlayMillis() {
		return timeToPlayMillis;
	}

	public String getQuestion(){
		return question;
	}
	
	public int getPoints(){
		return points;
	}
	
	public String getAnswer(){
		return answer;
	}
}
